package day0108HomeWork;

public class Number {
	private int num1;
	private int num2;
	
	
	
	//加（add）、减（sub）、乘（multi）、除（div）
	public void add() {
		System.out.println("两个数相加为" + (num1 + num2));
	}
	public int add1() {
		return num1 + num2;
		
	}
	public void sub() {
		System.out.println("两个数相减为" + (num1 - num2));
	}
	
	public void multi() {
		System.out.println("两数的乘积为" + (num1 * num2));
	}
	
	public void div() {
		System.out.println("num1 / num2 =" + (num1 / num2));
	}

	public Number(int num1, int num2) {
		super();
		this.num1 = num1;
		this.num2 = num2;
	}



	@Override
	public String toString() {
		return "Number [num1=" + num1 + ", num2=" + num2 + "]";
	}



	public int getNum1() {
		return num1;
	}



	public void setNum1(int num1) {
		this.num1 = num1;
	}



	public int getNum2() {
		return num2;
	}



	public void setNum2(int num2) {
		this.num2 = num2;
	}
	
	
	
	
	
	
	
}
